1. Field of the Invention
This invention relates to light pens for computers, and more particularly to a method and apparatus for interfacing a light pen to a computer.
2. Description of the Related Art
A number of methods have been developed for allowing a user to interact with a computer. The most widely used device for computer input is a keyboard, much like that provided on a typewriter. For many applications, primarily text-based programs such as word processors, the keyboard is an effective way to input data to the computer for an experienced touch-typist, however, keyboard interface devices pose limitations for users who are unskilled typists.
Two of the many other input devices that exist for computers are the "mouse" and the light pen. A mouse is a small device that is moved by hand on a flat surface, such as a desk top. The mouse provides signals to the computer which indicate the movement of the mouse on the flat surface (e.g., a desk top). Movement of the mouse on the flat surface corresponds to changes of x- and y-axis coordinates of a cursor which is displayed on the computer monitor. A light pen, on the other hand, is placed directly onto an area of the computer monitor screen. In conjunction with a computer interface apparatus, the position of the pen on the computer monitor screen is determined as an x-y coordinate. Mouse devices and light pens are usually fitted with some type of user-actuatable switch device. This switch device may be used to transmit special signals to the computer which may, for example, indicate that a selection has been made by the user.
The present state of computer software development is such that a significant number of new programs are being based on a graphical user interface (GUI) working in conjunction with an external pointing device such as a mouse or light pen. In a GUI, a cursor (often in the shape of an arrow) is typically displayed on the screen, and the position of the cursor may be manipulated by the user with the pointing device (i.e., the mouse or light pen). With a GUI, multiple-choice menus are graphically displayed onto the screen of a computer monitor. The multiple-choice menus are generally used to show selection options available to the user. Typically, the user makes a selection from a menu by positioning the cursor over an item in that menu then actuating the pointing device's switch to indicate that he has made his choice. While it is possible to assign keys on a keyboard for cursor positioning, and to move the cursor by repeatedly pressing these keys, keyboards are very inefficient as pointing devices when compared to light pens or mouse devices. An external device optimized for x-y positioning, such as a mouse or light pen, is generally quicker and easier to use than a keyboard, particularly for unskilled typists.
Many computer users prefer light pens to mouse devices because a light pen requires significantly less desk space than a mouse. Furthermore, some tasks such as freehand drawing are far easier to accomplish with a light pen than with a mouse. This is because a light pen is used directly on the surface of the computer monitor screen, much in the same way that a pen can be used on a piece of paper. When freehand drawing with a light pen, the user places the tip of the light pen onto the computer monitor screen. The position of the light pen on the computer monitor screen is determined by the computer, and the area of the computer monitor screen proximate to the tip of the light pen is darkened (or alternately brightened from a dimly illuminated background). The smallest area of the computer monitor screen that can be individually controlled by the computer system is called a pixel. Ideally, the pixel corresponding to the exact location of the tip of the light pen on the computer monitor screen is darkened (or illuminated). In this way, those portions of the computer monitor screen which have been touched by the light pen are darkened to display the pattern "drawn" by the light pen onto the computer monitor screen. It can be seen that freehand drawing is virtually impossible with a keyboard.
Prior to the present invention, light pen systems have characteristicly incorporated significant amounts of positional jitter and inaccuracy. That is, when the light pen is placed onto the computer monitor screen, a significant margin of error exists when calculating the position of the pixel(s) on the computer monitor screen proximate to the location of the tip of the light pen. Positional jitter and inaccuracy may cause the computer to darken pixels which do not exactly correspond to the position of the light pen on the computer monitor screen. In addition, positional jitter may cause certain pixels near to the tip of the light pen to alternately darken and illuminate so that the line drawn by the light pen appears to jitter or shake. In prior devices, the jitter has been reduced by averaging the position data within the computer over short periods of time (typically less than one second), but this reduces the responsiveness of the light pen to rapid movements by the user.
Another characteristic of prior light pen systems is that a significant amount of computational overhead is required to be used to determine whether or not the light pen is even pointing at an illuminated area of the computer monitor screen.
Thus a need exists for a light pen system which compensates for positional jitter and inaccuracy. A further need exists for a light pen system which can determine if the light pen is being employed on an unilluminated portion of the computer monitor screen, without requiring a significant amount of computational time.